<template>
  <component is="a-modal" v-model:visible="visible" width="50%" :title="title" :mask-closable="false"
    :ok-loading="loading" @cancel="close" @before-ok="submit">
    <div style="height: 70vh;overflow-y: scroll;">
      <a-form ref="formRef" :model="formData" :rules="rules" :auto-label-width="true">
        <a-form-item label="国家中文名称" field="name">

        </a-form-item>
        <a-form-item label="操作密码" field="admin_pay_password">
          <a-input-password v-model="formData.admin_pay_password" placeholder="请输入" />
        </a-form-item>
        <a-form-item label="谷歌验证码" field="google_code">
          <a-input v-model="formData.google_code" placeholder="请输入" />
        </a-form-item>
      </a-form>


    </div>




  </component>
</template>
<script setup>
import { onMounted, ref, reactive, computed, watch } from 'vue'
import memberApi from '@/api/system/member'
import { Message } from '@arco-design/web-vue'
import { throttle } from 'lodash';
import tool from '@/utils/tool'
const emit = defineEmits(["success"]);
const visible = ref(false);
const title = ref('')
const loading = ref(false);
const formData = reactive({
  id: '',
  name:'',
})
const rules = ref({
  name: [{ required: true, message: '请输入' }],
});
const open = async (data) => {
  formData.id = data.id
  formRef.value.resetFields();
  visible.value = true;
  getParams()
}
const paramsData = ref({})
const getParams = async () => {
  const { data } = await memberApi.update_pv_params(formData.id)
  paramsData.value = { ...data }
}
defineExpose({ open });
</script>